package com.zhku.orders.feignclient;

import com.zhku.base.model.PageParams;
import com.zhku.base.model.PageResult;
import com.zhku.base.model.RestResponse;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "goods-api", fallbackFactory = GoodsClientFactory.class)
@RequestMapping("/goods")
public interface GoodsClient {

    @GetMapping("/goods/{id}")
    public RestResponse<TtGoods> getGoods(@PathVariable("id") String id);

    @PostMapping("/goodsList/{id}")
    public PageResult<TtGoods> goodsList(@RequestBody(required = false) PageParams pageParams, @PathVariable("id") String id);
}
